---
title: "Zabbix"
sidebarTitle: "Zabbix Provider"
description: "Zabbix provider allows you to pull/push alerts from Zabbix"
---

<Warning>
  Please note that we currently only support Zabbix of version 6 and above
  (6.0^)
</Warning>

## Authentication Parameters

The `zabbix_frontend_url` and `auth_token` are required for connecting to the Zabbix provider. You can obtain them as described in the ["Connecting with the Provider"](./zabbix-provider#connecting-with-the-provider) section.

## Connecting with the Provider

### API Key

To obtain Zabbix authentication token, follow the following steps, divided in to 3 categories ([Docs](https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/users/api_tokens)):

First, login in to your Zabbix account (the provided `zabbix_frontend_url`) with a privileged user.

#### Create a User Role

1. Navigate to `Users` -> `User Roles` section.
2. In the top right corner of the screen, click `Create user role`
3. Give the role an indicative name (e.g. Keep Role)
4. In the `User type` selectbox, select `Super Admin`

- This is because some of the scopes we need are available to `Super Admin` user type only. [See here](https://www.zabbix.com/documentation/current/en/manual/api/reference/mediatype/create)

5. Remove all the checkboxes from everything, except 1 random `Access to UI elemets` which is required for any role.
6. In the `API methods` section, select `Allow list` and fill in the scopes as [mentioned below](./zabbix-provider#scopes), in the Scopes section.

<img height="200" src="/images/zabbix_role.png" />


#### Create a user

1. Navigate to `Users` -> `Users` section.
2. Follow the instructions to add a new user. Give it an indicative username (e.g. KeepUser)
3. In the `Permissions` tab, select the Role you have just created.
4. Click `Add`

#### Create API token

1. Navigate to `Users` -> `API tokens` section.
2. In the top right corner of the screen, click `Create API token`
3. Give the API token an indicative name (e.g. Keep Token)
4. Select the user you have just created
5. Unselect the `Set expiration date and time` checkbox and click `Add`
6. Copy the generated API token and keep it for further use in Keep.

## Scopes

Certain scopes may be required to perform specific actions or queries via Zabbix Provider. Below is a summary of relevant scopes and their use cases:

- `problem.get`
  | Required: `True`
  | Description: `The method allows to retrieve problems.`
- `mediatype.get`
  | Required: `False`
  | Required for Webhook: `True`
  | Description: `The method allows to retrieve media types.`
- `mediatype.update`
  | Required: `False`
  | Required for Webhook: `True`
  | Description: `This method allows to update existing media types.`
- `mediatype.create`
  | Required: `False`
  | Required for Webhook: `True`
  | Description: `This method allows to create new media types.`
- `user.get`
  | Required: `False`
  | Required for Webhook: `True`
  | Description: `The method allows to retrieve users.`
- `user.update`
  | Required: `False`
  | Required for Webhook: `True`
  | Description: `This method allows to update existing users.`

## Notes

<Note>
  When installing Zabbix webhook, Keep automatically adds a new media type of
  type Keep to your media types.

  After the new media type is added, Keep
  automatically adds this mediatype as a media to all existing users, in order
  to get all alerts incoming from Zabbix.
</Note>

## Webhook Integration Modifications

The automatic webhook integration grants Keep access to the following scopes within the Zabbix instance:
- `mediatype.get`
- `mediatype.update`
- `mediatype.create`
- `user.get`
- `user.update`

You can view the webhook settings under **Alerts > Media Types**

## Useful Links

- [Zabbix API](https://www.zabbix.com/documentation/current/en/manual/api)
